<?php
import('Database.Dal.~');

abstract class AClass{

	private $table;
	private $db;
	protected $data;

	/**
	 * Constructor
	 */
	function __construct(){
		$this->db = Hoa_Database_Dal::getInstance('myConn');
	}

	protected function showAll($requete){
		$statement = null;
		try {
			$statement = $this->db->query($requete);
			if(DEBUG) {
				echo '<pre>';
					print_r($statement->fetchAll());
				echo '</pre>';
			}
			$this->data = $statement->fetchAll();
		} catch ( Hoa_Database_Dal_Exception $e ) {
			$e->raiseError();
		}
	}
}

?>